import java.lang.Math;
interface Shape{
	void size();
}
class Rectangle implements Shape{
	float x,y;
	public Rectangle(float x,float y) {
		this.x=x;
		this.y=y;
	}
	public void size() {
		System.out.printf("矩形面积为：%.4f\n",x*y);
	}
}
class Circle implements Shape{
	float r;
	public Circle(float x) {
		r=x;
	}
	public void size() {
		System.out.printf("圆面积为：%.4f\n",Math.PI*r*r);
	}
}
class Cylinder implements Shape{
	float r,h;
	public Cylinder(float x,float y) {
		r=x;
		h=y;
	}
	public void size() {
		System.out.printf("圆柱体体积为：%.4f",Math.PI*r*r*h);
	}
}
public class Main {
	public static void main(String[] args) {
		int i;
		Shape shape[]=new Shape[3];
		shape[0]=new Rectangle(1,2);
		shape[1]=new Circle(1);
		shape[2]=new Cylinder(1,2);
		for(i=0;i<3;i++)
			shape[i].size();
	}
}